<?php
	require_once(dirname(__FILE__) . '/assert.php');
	require_once(dirname(__FILE__) . '/../viae/workspaceCanvasSizeCalculator.php');
	
	//calculateWorkspaceCanvasSize($width, $height, $maxCanvasWidth, $maxCanvasHeight)
	
	$result = calculateWorkspaceCanvasSize(100,200,100,200);
	AssertEquals(1, $result[0]);
	AssertEquals(1, $result[1]);
	
	$result = calculateWorkspaceCanvasSize(50,100,100,200);
	AssertEquals(1, $result[0]);
	AssertEquals(1, $result[1]);
	
	$result = calculateWorkspaceCanvasSize(150,400,100,200);
	AssertEquals(0.66666666666667, $result[0]);
	AssertEquals(0.5, $result[1]);
	
	$result = calculateWorkspaceCanvasSize(150,400,100,200);
	AssertEquals(0.66666666666667, $result[0]);
	AssertEquals(0.5, $result[1]);
	
	$result = calculateWorkspaceCanvasSize(755.9055118,755.9055118,566.6666667,466.6666667);
	AssertEquals(0.74965277783281, $result[0]);
	AssertEquals(0.61736111116421, $result[1]);
?>